import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router'
import { createPinia } from 'pinia'
import { setRootFontSize } from '@/utils'
import request from '@/utils/request'
import 'element-plus/theme-chalk/display.css'

const pinia = createPinia()

// 创建应用实例
const app = createApp(App)

// 挂载到全局
app.config.globalProperties.$http = request

// 基准字体大小为 16px，设计稿宽度为 1920px
//setRootFontSize(16, 1920);
//window.addEventListener('resize', () => setRootFontSize());

// 使用插件并挂载
app.use(router).use(pinia).mount('#app')